package com.netwit.web.controller;

import com.netwit.service.ExportSQL;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.util.Map;

@Slf4j
@Controller
@RequestMapping("/exp")
public class ExportSQLController {
    @Autowired
    private ExportSQL exper;

    @GetMapping("")
    @ResponseBody
    public String getSql(Map<String, Object> map, Model model, ServletRequest request, ServletResponse response) {
        return exper.exportPaper("dbf0fe09af5a4ba09034f92772d11adf");
    }
}
